﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HTTT.DataAccess;
using HTTT.Utilities;
using HTTT.AD;

namespace HTTT.Bussiness
{
    public class HT_DispatchBO
    {

        public IEnumerable<HT_Dispatch> GetAllHT_Dispatch()
        {
            HT_DispatchDAO _dao = new HT_DispatchDAO();
            return _dao.GetAllHT_Dispatch();
        }
        public HT_Dispatch GetHT_DispatchById(Guid id)
        {
            HT_DispatchDAO _dao = new HT_DispatchDAO();
            return _dao.GetHT_DispatchByID(id);
        }
        public bool InsertHT_Dispatch(HT_Dispatch inHT_Dispatch)
        {
            HT_DispatchDAO _dao = new HT_DispatchDAO();
            return _dao.InsertHT_Dispatch(inHT_Dispatch);
        }
        public bool UpdateHT_Dispatch(HT_Dispatch inHT_Dispatch)
        {
            HT_DispatchDAO _dao = new HT_DispatchDAO();
            return _dao.UpdateHT_Dispatch(inHT_Dispatch);
        }

        public ReturnValue<bool> DeleteHT_Dispatch(Guid id)
        {
            HT_DispatchDAO _dao = new HT_DispatchDAO();
            return _dao.DeleteHT_Dispatch(id); 
        }

        public IEnumerable<HT_Dispatch> SearchHT_Dispatch(string keyword)
        {
            HT_DispatchDAO _dao = new HT_DispatchDAO();
            return _dao.SearchHT_Dispatch(keyword);
        }
    }
}
